<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html template="../template/template.xhtml"
    xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<body>
	
	<!--modal para alterar dados do cliente -->
	
		<p:dialog header="Alterar Cliente:" widgetVar="modalAlterarCliente" id="modalAlterar" modal="true" width="1100">
			
			<p:messages autoUpdate="true" ></p:messages>
				<br></br>
				<h:panelGrid id="grid1" columns="12" style="margin-bottom:10px">  
		            <h:outputLabel styleClass="label_10" for="nome" value="#{msg.label_nome} "/><strong>*</strong>  
		            <p:inputText id="nome" value="#{clienteMB.mostrarCliente.nome}" size="35" />
		          	
		          	<h:outputLabel styleClass="label_20" for="sobrenome" value="#{msg.label_sobr} " /><strong>*</strong>  
		            <p:inputText id="sobrenome" value="#{clienteMB.mostrarCliente.sobrenome}" size="35" />  
		            
		            <h:outputLabel  styleClass="label_80" for="cpf" value="#{msg.label_cpf} " /><strong>*</strong>  
		            <p:inputText id="cpf" value="#{clienteMB.mostrarCliente.cpf}" size="35"/>
       		   </h:panelGrid>
			   
				<h:panelGrid columns="7" styleClass="label_27" >
					<h:outputLabel for="cepAlt" value="#{msg.label_cep} " />
					<p:inputMask id="cepAlt" value="#{clienteMB.mostrarCliente.cep}" size="15" mask="99999-999"/>
					
					<h:outputLabel styleClass="label_190" for="ruaAlt" value="#{msg.label_rua} " />
					<p:inputText  id="ruaAlt" value="#{clienteMB.mostrarCliente.rua}" size="40"/>

					<h:outputLabel styleClass="label_40" for="numAlt" value="#{msg.label_numero} " />
					<p:inputText id="numAlt" value="#{clienteMB.mostrarCliente.numero}" size="4" />
				</h:panelGrid>
				<br></br>

				<h:panelGrid columns="6" styleClass="label_20">
					<h:outputLabel for="bairroAlt" value="Bairro: " />
					<p:inputText id="bairroAlt" value="#{clienteMB.mostrarCliente.bairro}" size="25" />

					<h:outputLabel styleClass="label_110" for="cidadeAlt" value="#{msg.label_cidade} " />
					<p:inputText id="cidadeAlt" value="#{clienteMB.mostrarCliente.cidade}" size="25" />

					<h:outputLabel styleClass="label_135" value="#{msg.label_uf} "></h:outputLabel>
					<p:selectOneMenu style="width:60px;" id="estadoAlt"
						value="#{clienteMB.mostrarCliente.uf}">
						<f:selectItem itemLabel="SP" itemValue="" />
						<f:selectItem itemLabel="MG" itemValue="" />
						<f:selectItem itemLabel="RJ" itemValue="" />
					</p:selectOneMenu>
				</h:panelGrid>
				<br></br>
				
				<h:panelGrid columns="6" style="margin-bottom:10px">
					<h:outputLabel for="telefoneAlt" value="#{msg.label_res} " />
					<p:inputMask id="telefoneAlt" style="margin-left:4px;" value="#{clienteMB.mostrarCliente.telResidencial}" size="15" mask="(99) 9999-9999" />

					<h:outputLabel styleClass="label_175" for="celularAlt" value="#{msg.label_cel} " />
					<p:inputMask id="celularAlt" value="#{clienteMB.mostrarCliente.celular}" size="15" mask="(999) 999-9999" />
					
					<h:outputLabel styleClass="label_198" for="emailAlt" value="Email: " />
					<p:inputText id="emailAlt" value="#{clienteMB.mostrarCliente.celular}" size="25" />
				</h:panelGrid>
				<br></br>
				
				<h:panelGrid columns="2" style="margin-bottom:10px">
					<h:outputLabel for="obsAlt" value="#{msg.label_obs} " />
					<p:inputTextarea id="obsAlt" style="margin-left:25px;" value="#{clienteMB.mostrarCliente.observacao}" rows="8" cols="80" autoResize="false" />
				</h:panelGrid>
				
				 <p:commandButton process="@form" action="#{clienteMB.alterar}" value="#{msg.btn_alterar}" style="margin-left:900px;">
				 	<f:actionListener type="casamento.util.ValidaCliente"></f:actionListener>
				 </p:commandButton>
				 <p:commandButton  value="#{msg.btn_fechar}" onclick="modalAlterarCliente.hide()"  update="dataTable" />
				  
				 <p style="margin-top: -10px;"><strong>(*) </strong> Campos Obrigatórios.</p>
		
		</p:dialog>		
		
	</body>
</html>
